Imports System.Threading
Module modMain
    ' Set the version number since VB will not allow
    '  Developement Stages
    Public Const VERSION As String = "0.0.1 d"
    ' Declare App as the Main clsApp Instance
    ' throughout the entire Application
    Public App As clsApp
    ' Declare sktMain as the Main clsSocket Instance
    ' throughout the entire Application
    Public sktMain As clsSocket
    ' Declare frmMain as the Main clsApp Instance
    ' throughout the entire Application
    Public frmMain As FormMain = New FormMain
    Public frmSplash As FormSplash = New FormSplash
    Public frmOfflines As FormOfflineView
    Public frmFriendSearch As FormAddFriend
    Public bSplash As Boolean = True
    'Public UpToDate As Boolean = False
    Public AppNewThread As Thread
    Public ofln() As clsOfflines = {New clsOfflines}
    ''' -----------------------------------------------------------------------------
    ''' <summary>
    ''' 
    ''' </summary>
    ''' <param name="args"></param>
    ''' <remarks>
    ''' </remarks>
    ''' <history>
    ''' 	[Jas]	7/15/2006	Created
    ''' </history>
    ''' -----------------------------------------------------------------------------
    Public Sub main(ByVal args() As String)
        'This is the no-connect argument. It will disable all comms with the server.
        ' This is mostly for testing purposes.
        If args.IndexOf(args, "-no-connect") < 0 Then
            sktMain = New clsSocket
        Else
            sktMain = New clsSocket(True)
        End If
        'This is the no-splash argument. Unfortunatly, it doesn't work right. :(
        If args.IndexOf(args, "-no-splash") >= 0 Then
            bSplash = False
            frmSplash.Close()
            frmSplash.Dispose()
            frmSplash = Nothing
        End If

        Application.Run(frmMain)
    End Sub
End Module
